package org.yangspring.samples.mvc.serviceOracle;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.yangspring.samples.mvc.daoOracle.CustomersDAO;
import org.yangspring.samples.mvc.domainOracle.Customers;

import java.util.List;

/**
 * Created by whyang on 2017/06/22.
 */

@Service
public class CustomersServiceImpl implements CustomersService {

    private static final Logger logger = LoggerFactory.getLogger(CustomersServiceImpl.class);

    @Autowired
    private CustomersDAO customerDao;

//    public void setCustomerDao(CustomersDAO customerDao){
//        this.customerDao = customerDao;
//    }

    @Transactional
    public List<Customers> listCustomer(){
        logger.warn("\nOracle CustomersServiceImpl\n");
        return this.customerDao.listCustomer();
    }

}
